package com.micro.ai.models.service;

import com.micro.ai.models.entity.FineTunedModel;

/**
 * 模型部署服务接口
 * 负责将微调后的模型部署到模型服务
 * 
 * @author micro-ai
 * @since 0.0.1
 */
public interface ModelDeploymentService {

    /**
     * 部署模型到服务
     * 
     * @param model 微调模型
     * @return 部署信息（API端点、模型服务ID等）
     */
    DeploymentInfo deployModel(FineTunedModel model);

    /**
     * 验证模型服务可用性
     * 
     * @param deploymentInfo 部署信息
     * @return 是否可用
     */
    boolean verifyDeployment(DeploymentInfo deploymentInfo);

    /**
     * 取消部署
     * 
     * @param deploymentInfo 部署信息
     */
    void undeployModel(DeploymentInfo deploymentInfo);

    /**
     * 部署信息
     */
    class DeploymentInfo {
        private String modelServiceId; // 模型服务中的ID
        private String apiEndpoint; // API端点URL
        private String apiKey; // API访问密钥
        private String status; // deployed, active, failed

        public String getModelServiceId() {
            return modelServiceId;
        }

        public void setModelServiceId(String modelServiceId) {
            this.modelServiceId = modelServiceId;
        }

        public String getApiEndpoint() {
            return apiEndpoint;
        }

        public void setApiEndpoint(String apiEndpoint) {
            this.apiEndpoint = apiEndpoint;
        }

        public String getApiKey() {
            return apiKey;
        }

        public void setApiKey(String apiKey) {
            this.apiKey = apiKey;
        }

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }
    }
}

